Sub 标准单元格()
    Dim x%, y%
    Dim iRow%
    iRow = ActiveCell.CurrentRegion.Rows.Count
    
    Application.ScreenUpdating = False
    With ActiveCell.CurrentRegion
        .Borders(xlDiagonalDown).LineStyle = xlNone
        .Borders(xlDiagonalUp).LineStyle = xlNone
        With .Borders(xlEdgeLeft)
            .LineStyle = xlContinuous
            .ColorIndex = 0
            .TintAndShade = 0
            .Weight = xlMedium
        End With
        With .Borders(xlEdgeTop)
            .LineStyle = xlContinuous
            .ColorIndex = xlAutomatic
            .TintAndShade = 0
            .Weight = xlMedium
        End With
        With .Borders(xlEdgeBottom)
            .LineStyle = xlContinuous
            .ColorIndex = 0
            .TintAndShade = 0
            .Weight = xlMedium
        End With
        With .Borders(xlEdgeRight)
            .LineStyle = xlContinuous
            .ColorIndex = 0
            .TintAndShade = 0
            .Weight = xlMedium
        End With
        With .Borders(xlInsideVertical)
            .LineStyle = xlContinuous
            .ThemeColor = 1
            .TintAndShade = -0.14996795556505
            .Weight = xlThin
        End With
        With .Borders(xlInsideHorizontal)
            .LineStyle = xlContinuous
            .ThemeColor = 1
            .TintAndShade = -0.14996795556505
            .Weight = xlThin
        End With
        
        
        
        
        With .Rows(1)
            .HorizontalAlignment = xlCenter
            .VerticalAlignment = xlCenter
            .WrapText = False
            .Orientation = 0
            .AddIndent = False
            .IndentLevel = 0
            .ShrinkToFit = False
            .ReadingOrder = xlContext
            
            .Style = "60% - 着色 1"
            '.MergeCells = True
            With .Font
                .Name = "微软雅黑 Light"
                .FontStyle = "常规"
                .Size = 10
                .Strikethrough = False
                .Superscript = False
                .Subscript = False
                .OutlineFont = False
                .Shadow = False
                .Underline = xlUnderlineStyleNone
                .ThemeColor = xlThemeColorDark1
                .TintAndShade = 0
                .ThemeFont = xlThemeFontNone
            End With
        End With
        With .Rows(2)
            .Style = "40% - 着色 5"
            With .Font
                .Name = "微软雅黑 Light"
                .FontStyle = "常规"
                .Size = 10
                .Strikethrough = False
                .Superscript = False
                .Subscript = False
                .OutlineFont = False
                .Shadow = False
                .Underline = xlUnderlineStyleNone
                .ThemeColor = xlThemeColorLight1
                .TintAndShade = 0
                .ThemeFont = xlThemeFontNone
            End With
        End With
    End With
    For x = 3 To iRow
        If x Mod 2 = 0 Then
            With ActiveCell.CurrentRegion
                With .Rows(x)
                    .Style = "20% - 着色 1"
                    With .Font
                        .Name = "微软雅黑 Light"
                        .FontStyle = "常规"
                        .Size = 10
                        .Strikethrough = False
                        .Superscript = False
                        .Subscript = False
                        .OutlineFont = False
                        .Shadow = False
                        .Underline = xlUnderlineStyleNone
                        .ThemeColor = xlThemeColorLight1
                        .TintAndShade = 0
                        .ThemeFont = xlThemeFontNone
                    End With
                End With
            End With
        Else
            With ActiveCell.CurrentRegion
                With .Rows(x)
                    With .Interior
                        .Pattern = xlNone
                        .TintAndShade = 0
                        .PatternTintAndShade = 0
                    End With
                    With .Font
                        .Name = "微软雅黑 Light"
                        .FontStyle = "常规"
                        .Size = 10
                        .Strikethrough = False
                        .Superscript = False
                        .Subscript = False
                        .OutlineFont = False
                        .Shadow = False
                        .Underline = xlUnderlineStyleNone
                        .ThemeColor = xlThemeColorLight1
                        .TintAndShade = 0
                        .ThemeFont = xlThemeFontNone
                    End With
                End With
            End With
        End If
    Next x
    Application.ScreenUpdating = True
    
End Sub


Sub 标准九宫格()
    Dim x%, y%
    Dim iRow%, iColumn%, iRowX%, iColumnY%
    iRow = Selection.Rows.Count
    iColumn = Selection.Columns.Count
    iRowX = Selection.Cells(1, 1).Row - 1
    iColumnY = Selection.Cells(1, 1).Column - 1
    
    Application.ScreenUpdating = False
    With ActiveCell.CurrentRegion
        .Borders(xlDiagonalDown).LineStyle = xlNone
        .Borders(xlDiagonalUp).LineStyle = xlNone
        With .Borders(xlEdgeLeft)
            .LineStyle = xlContinuous
            .ColorIndex = xlAutomatic
            .TintAndShade = 0
            .Weight = xlMedium
        End With
        With .Borders(xlEdgeTop)
            .LineStyle = xlContinuous
            .ColorIndex = xlAutomatic
            .TintAndShade = 0
            .Weight = xlMedium
        End With
        With .Borders(xlEdgeBottom)
            .LineStyle = xlContinuous
            .ColorIndex = xlAutomatic
            .TintAndShade = 0
            .Weight = xlMedium
        End With
        With .Borders(xlEdgeRight)
            .LineStyle = xlContinuous
            .ColorIndex = xlAutomatic
            .TintAndShade = 0
            .Weight = xlMedium
        End With
        With .Borders(xlInsideVertical)
            .LineStyle = xlContinuous
            .ColorIndex = 0
            .TintAndShade = 0
            .Weight = xlThin
        End With
        With .Borders(xlInsideHorizontal)
            .LineStyle = xlContinuous
            .ColorIndex = 0
            .TintAndShade = 0
            .Weight = xlThin
        End With
        
        
        With .Rows(1)
            .HorizontalAlignment = xlCenter
            .VerticalAlignment = xlCenter
            .WrapText = False
            .Orientation = 0
            .AddIndent = False
            .IndentLevel = 0
            .ShrinkToFit = False
            .ReadingOrder = xlContext
            
            .Style = "着色 1"
            '.MergeCells = True
            With .Font
                .Name = "微软雅黑 Light"
                .FontStyle = "常规"
                .Size = 10
                .Strikethrough = False
                .Superscript = False
                .Subscript = False
                .OutlineFont = False
                .Shadow = False
                .Underline = xlUnderlineStyleNone
                .ThemeColor = xlThemeColorDark1
                .TintAndShade = 0
                .ThemeFont = xlThemeFontNone
            End With
        End With
        
    End With
    For x = 2 To iRow
        For y = 1 To iColumn
            If (x + y) Mod 2 = 1 Then
                With Cells(iRowX + x, iColumnY + y)
                    .Style = "20% - 着色 1"
                    With .Font
                        .Name = "微软雅黑 Light"
                        .FontStyle = "常规"
                        .Size = 10
                        .Strikethrough = False
                        .Superscript = False
                        .Subscript = False
                        .OutlineFont = False
                        .Shadow = False
                        .Underline = xlUnderlineStyleNone
                        .ThemeColor = xlThemeColorLight1
                        .TintAndShade = 0
                        .ThemeFont = xlThemeFontNone
                    End With
                End With
            Else
                With Cells(iRowX + x, iColumnY + y)
                    With .Interior
                        .Pattern = xlNone
                        .TintAndShade = 0
                        .PatternTintAndShade = 0
                    End With
                    With .Font
                        .Name = "微软雅黑 Light"
                        .FontStyle = "常规"
                        .Size = 10
                        .Strikethrough = False
                        .Superscript = False
                        .Subscript = False
                        .OutlineFont = False
                        .Shadow = False
                        .Underline = xlUnderlineStyleNone
                        .ThemeColor = xlThemeColorLight1
                        .TintAndShade = 0
                        .ThemeFont = xlThemeFontNone
                    End With
                End With
            End If
        Next y
    Next x
    Application.ScreenUpdating = True
    
End Sub




Sub 清理单元格()
    
    With ActiveCell.CurrentRegion
        .Borders(xlDiagonalDown).LineStyle = xlNone
        .Borders(xlDiagonalUp).LineStyle = xlNone
        .Borders(xlEdgeLeft).LineStyle = xlNone
        .Borders(xlEdgeTop).LineStyle = xlNone
        .Borders(xlEdgeBottom).LineStyle = xlNone
        .Borders(xlEdgeRight).LineStyle = xlNone
        .Borders(xlInsideVertical).LineStyle = xlNone
        .Borders(xlInsideHorizontal).LineStyle = xlNone
        .HorizontalAlignment = xlGeneral
        .VerticalAlignment = xlCenter
        .WrapText = False
        .Orientation = 0
        .AddIndent = False
        .IndentLevel = 0
        .ShrinkToFit = False
        .ReadingOrder = xlContext
        .MergeCells = False
        With .Interior
            .Pattern = xlNone
            .TintAndShade = 0
            .PatternTintAndShade = 0
        End With
        '.UnMerge
    End With
End Sub


